package org.student.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Component;
import org.student.dao.IStudentInfoDao;
import org.student.entity.StuSys_Student;

@Component("StudentInfoService")
public class StudentInfoService implements IStudentInfoDao {

	private IStudentInfoDao iStudentInfoDao;

	public IStudentInfoDao getiStudentInfoDao() {
		return iStudentInfoDao;
	}

	@Resource(name = "StudentInfoDaoImpl")
	public void setiStudentInfoDao(IStudentInfoDao iStudentInfoDao) {
		this.iStudentInfoDao = iStudentInfoDao;
	}

	@Override
	public void studentInfoSave(StuSys_Student studentInfo) throws Exception {
		this.iStudentInfoDao.studentInfoSave(studentInfo);
	}

	@Override
	public List<StuSys_Student> getAllStudent() throws Exception {
		return this.iStudentInfoDao.getAllStudent();
	}

	@Override
	public List<StuSys_Student> getStudentsById(String id) throws Exception {
		return this.iStudentInfoDao.getStudentsById(id);
	}

	@Override
	public List<StuSys_Student> getStudentsByClass(String className)
			throws Exception {
		return this.iStudentInfoDao.getStudentsByClass(className);
	}

	@Override
	public List<StuSys_Student> getStudentsByInsititue(String insititueName)
			throws Exception {
		return this.iStudentInfoDao.getStudentsByInsititue(insititueName);
	}

	@Override
	public List<StuSys_Student> getStudentsByName(String name) throws Exception {
		return this.iStudentInfoDao.getStudentsByName(name);
	}

	@Override
	public List<StuSys_Student> getStudentsByWords(String words)
			throws Exception {
		return this.iStudentInfoDao.getStudentsByWords(words);
	}
	
	@Override
	public void deleteStudentById(int id) throws Exception {
		this.iStudentInfoDao.deleteStudentById(id) ;
	}

	@Override
	public void updateStudent(StuSys_Student student) throws Exception {
		this.iStudentInfoDao.updateStudent(student) ;
	}

	@Override
	public StuSys_Student getStudentInfoById(int id) throws Exception {
		return this.iStudentInfoDao.getStudentInfoById(id) ;
	}

	@Override
	public void deleteScore(int id) throws Exception {
		this.iStudentInfoDao.deleteScore(id) ;
	}

}
